package br.com.colecoes;

import java.util.Comparator;

public class Comparacoes {
	public static void main(String[] args) {

		Boolean b = true;
		System.out.println(b.compareTo(false));
		System.out.println(new ComparaBoleano().compare(b, false));
		
	}
}

class ComparaBoleano implements Comparator<Boolean>{
	public int compare(Boolean p1, Boolean p2){
		Boolean b1 = (Boolean)p1;
		Boolean b2 = (Boolean)p2;
		
		if (b1.equals(b2)){
			return 0;
		}
		else if (b1){
			return -1;
		}
		else{
			return 1;
		}
	}
}
